# -*- coding: utf-8 -*-
"""store ca-certs for gateways

Revision ID: f9101f3b00e3
Revises: a706a3320c56
Create Date: 2025-11-05 15:18:16.659224

"""

# Standard
from typing import Sequence, Union

# Third-Party
from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision: str = "f9101f3b00e3"
down_revision: Union[str, Sequence[str], None] = "a706a3320c56"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("gateways", sa.Column("ca_certificate", sa.Text(), nullable=True))
    op.add_column("gateways", sa.Column("ca_certificate_sig", sa.String(length=64), nullable=True))
    op.add_column("gateways", sa.Column("signing_algorithm", sa.String(length=20), nullable=True))
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("gateways", "signing_algorithm")
    op.drop_column("gateways", "ca_certificate_sig")
    op.drop_column("gateways", "ca_certificate")
    # ### end Alembic commands ###
